#!/bin/bash

# ----------------------------------------------------------------------
# Filename:   75564-rpm-ql.sh
# Version:    1.0
# Date:       2013/12/03
# Author:     yuanhui.shi
# Email:      yuanhui.shi@cs2c.com.cn
# Summary:    02系统基本功能-07开发环境-02开发工具-02rpm构建工具-08查询已安装软件包安装在何处
# Notes:      rpm命令
# Copyright:  China Standard Software Co., Ltd.
# History：     
#             Version 1.0, 2013/12/03
#             -   The first one
# ----------------------------------------------------------------------

PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH

source ../../lib/Echo.sh

source ../../lib/XmlParse.sh


function CleanData ()
{
  EchoInfo "75564-rpm-ql.sh执行完毕"
}

trap "CleanData" EXIT INT

#查询已安装的软件包都安装在何处
EchoInfo "判断软件包是否已安装"
rpm -qa |grep gcc
EchoResult "该软件已安装"

EchoInfo "给出一个已安装的软件包的名称，查询该包都安装在何处"
rpm -ql gcc
EchoResult "系统能够查询出该软件包到底装在何处"



